//
//  PTReadVideo.swift
//  PTWatch Watch App
//
//  Created by sc-chen on 2023/9/20.
//

import SwiftUI

struct PTReadVideo: View {
    @State private var selectedTabIndex = 0
    var content_video = "视频"
    var content_audio = "音频"
    var content_img = "图片"
    var body: some View {
        /*VStack {
            HStack(spacing: 0) {
                Button(action: { selectedTabIndex = 0 }) {
                    Text(content_video)
                        .foregroundColor(selectedTabIndex == 0 ? .blue : .gray)
                        .font(.system(size: 15))
                }
                .overlay(
                    Rectangle()
                        .stroke(Color.green, lineWidth: selectedTabIndex == 0 ? 2 : 0)
                        .frame(height: selectedTabIndex == 0 ? 2 : 0)
                        .position(x:30,y:50)
                )
                
                
                Button(action: { selectedTabIndex = 1 }) {
                    Text(content_audio)
                        .foregroundColor(selectedTabIndex == 1 ? .blue : .gray)
                        .font(.system(size: 15))
                }
                .overlay(
                    Rectangle()
                        .stroke(Color.green, lineWidth: selectedTabIndex == 1 ? 2 : 0)
                        .frame(height: selectedTabIndex == 1 ? 2 : 0)
                        .position(x:30,y:50)
                )
                
                Button(action: { selectedTabIndex = 2 }) {
                    Text(content_img)
                        .foregroundColor(selectedTabIndex == 2 ? .blue : .gray)
                        .font(.system(size: 15))
                }
                .overlay(
                    Rectangle()
                        .stroke(Color.green, lineWidth: selectedTabIndex == 2 ? 2 : 0)
                        .frame(height: selectedTabIndex == 2 ? 2 : 0)
                        .position(x:30,y:50)
                )
            }
            .padding(.horizontal)
            
            TabView(selection: $selectedTabIndex) {
                PTGetVideo().tag(0)
                PTGetAudio().tag(1)
                PTGetImg().tag(2)
            }
            .tabViewStyle(PageTabViewStyle(indexDisplayMode: .never))
            .indexViewStyle(PageIndexViewStyle(backgroundDisplayMode: .never))
        }*/
        
        Text("不支持读取媒体影音的开发功能")
    }
}

struct PTReadVideo_Previews: PreviewProvider {
    static var previews: some View {
        PTReadVideo()
    }
}
